using System;
using System.Threading.Tasks;
using MQTTnet;


namespace AvaloniaApplication1.Service;

public class MQTTService
{
    private IMqttClient _mqttClient;
    private  MqttClientOptions _options;
    public event Action<string> OnMessageReceived;

    public async Task InitializeAsync()
    {
        var factory =new MqttClientFactory();
        _mqttClient = factory.CreateMqttClient();
        _options = new MqttClientOptionsBuilder()
            .WithClientId("AvaloniaApp")
            .WithTcpServer("172.16.2.22", 8630)
            .Build();

    }

    public MQTTService()
    {


    }

}